<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 4.01 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" pageEncoding="utf-8"%>
<%@ include file="/pages/safeai/jsp/common/taglibs.jsp"%>
<%@ page isELIgnored="false"%>
<html>
	<head>
		<title>搜索结果页 - 锐意网 - 中文最大网上摄影器材商城</title>
		<%@ include file="/pages/safeai/jsp/common/meta.jsp"%>
		<link href="${ctx}/css/style.css" rel="stylesheet" type="text/css" />
		<script language="JavaScript" type="text/javascript"
			src="${ctx}/script/shop/bannerrollover.js"></script>
		<script language="JavaScript" src="${ctx}/js/tabar.js"></script>
		<script language="JavaScript" src="${ctx}/script/common/common.js"></script>
		<script language="JavaScript" src="${ctx}/js/sort.js"></script>
		<script language="JavaScript" src="${ctx}/js/json.js"></script>
		<script language="JavaScript" src="${ctx}/js/filter.js"></script>
		<script language="JavaScript" src="${ctx}/js/jquery.js"></script>
		<script language="JavaScript" src="${ctx}/script/shop/productShop.js"></script>
		<script language="JavaScript"
			src="${ctx}/script/shop/productnotify.js"></script>
		<script language="JavaScript" type="text/javascript"
			src="${ctx}/js/ScrollPic.js"></script>
		<script type="text/javascript">
		jQuery(document).ready(function(){
			if(jQuery("#catalogNameButton").length>0 && jQuery("#brandNameButton").length>0){
				jQuery("#plus").show();
			}
			jQuery("div.filters a").bind("mousedown",doFilter);
			jQuery("div.products_status img").bind("mousedown",fillFilters);
			jQuery("div.products_status img[onclick]").bind("mousedown",function(){
				jQuery(this).trigger("click");
			});
			jQuery("div.products_status select.products_sort").bind("change",function(event){
				jQuery("#sort").val($(event.target).val());
				jQuery("#offset").val("0");
				fillFilters();
				jQuery("form#filterForm")[0].submit();
			});
			jQuery("div.products_status img[id=grid]").bind("mousedown",function(){
				jQuery("#view").val("1");
				jQuery("form#filterForm")[0].submit();
			});
			jQuery("div.products_status img[id=list]").bind("mousedown",function(){
				jQuery("#view").val("2");
				jQuery("form#filterForm")[0].submit();
			});
			jQuery(":checkbox[name=chkSel]").bind("click",function(event){
				var evt = jQuery(event.target);
				if(jQuery("div.products_compare ul>li[id][id!=" + evt.val() + "]").length / 2 == 2){
					evt.attr("checked",false);
					alert("最多只能有2个商品参加比较!");
					return;
				}
				if(evt.attr("checked")){
					jQuery("div.products_compare ul>li:has(:button.products_compare_menu)").before(jQuery("<li id=" + evt.val() + ">&nbsp;" + evt.attr("label") + "</li>").prepend(jQuery("<img src='${ctx}/images/compare_cancel.jpg' border='0'/>").css("cursor","pointer").mousedown(removeCompareProduct)));
				}else{
					jQuery("div.products_compare ul>li").remove("#" + evt.val());
				}
			});
			jQuery("div.products_compare :button.products_compare_menu").bind("click",compare);
		});
		function Left(value,brandName){
			jQuery("#brandId").val(value);
			jQuery("#offset").val(0);
			jQuery("#textBrand").val(brandName);	
			jQuery("form#filterForm")[0].submit();
		}
		function LeftCata(value,catalogName){
			jQuery(".textCatalog").val(catalogName);
			alert(jQuery(".textCatalog").val());
			
			jQuery("#brandId").val("");
			jQuery("#offset").val(0);
			jQuery("#textBrand").val("");
			jQuery(".selectpp").val(value);
			jQuery("form#filterForm")[0].submit();
		}
		function filterCatalog(){
			jQuery(".textCatalog").val("");
			jQuery("#offset").val(0);
			jQuery(".selectpp").val("");
			jQuery("form#filterForm")[0].submit();
		}
		function filterBrand(){
			jQuery("#brandId").val("");
			jQuery("#textBrand").val("");
			jQuery("#offset").val(0);
			jQuery("form#filterForm")[0].submit();
		}
		
</script>
	</head>
	<body>
		<div class="bg">
			<div class="bg_inside">
				<div class="head">
					<%@ include file="/pages/safeai/jsp/shop/header.jsp"%>
				</div>
				<form id="filterForm" action="${ctx}/catalog/catalogMessage.do"
					method="post">
					<input type="hidden" name="method" value="productSearch">
					<input type="hidden" id="catalogCode" name="catalogCode"
						value="${catalog.catalogCode}">
					<input type="hidden" id="offset" name="pager.offset"
						value="${Page.offset}" />
					<input type="hidden" name="pageSize" value="${Page.pageSize}" />
					<input type="hidden" id="view" name="view" value="${view}">
					<input type="hidden" id="sort" name="sort" value="${sort}">
					<input type="hidden" name="name" value="${name}" />
					<input type="hidden" name="textfield" value="${name}" />
					<input type="hidden" class="selectpp" id="select" name="select"
						value="${catalogCode}" />
					<input type="hidden" class="textCatalog" id="text" name="text"
						value="${text}" />
					<input type="hidden" id="textBrand" name="textBrand"
						value="${textBrand}" />
					<input type="hidden" id="brandId" name="brandId" value="${brandId}" />
					<div class="middle">

						<div class="search_right_cont ">
							<div class="middle_right_content">
								<div class="middle_right_content_newstop">
									<span class="middle_right_content_top_titletext">筛选搜索结果
									</span>
								</div>
								<div class="search_filter">
									<ul>
										<li>
											按类别筛选结果
										</li>
										<logic:iterate id="left" name="searchCatalogLeft">
											<a href="#"
												onClick="LeftCata('${left.catalogId}','${left.catalogName}');"><li>
													<span style="cursor: hand;">${left.catalogName}(${left.prouctNum})</span>
												</li> </a>
										</logic:iterate>
										<li>
											按品牌筛选结果
										</li>
										<logic:iterate id="left" name="searchBrandLeft">
											<a href="#"
												onClick="Left('${left.brandId}','${left.brandName}');"><li>
													<span style="cursor: hand;">${left.brandName}(${left.prouctNum})</span>
												</li> </a>
										</logic:iterate>
									</ul>
								</div>
								<div class="middle_right_content_bottom"></div>
							</div>
						</div>
						<div class="middle_left" style="float: right; margin-top: 10px">
							<logic:empty name="viesRange" property="records">
								<div class="search_result">
									对不起，没有搜索到
									<span style="color: #ff9900">"${name}"</span>相关的商品，请重新输入商品关键字进行搜索！
								</div>
							</logic:empty>
							<logic:notEmpty name="viesRange" property="records">
								<div class="search_fil">
									<ul>
										<li>
											搜索
											<span style="color: #ff9900">${name}</span>的结果如下
										</li>
										<li>
											<span
												style="width: auto; height: auto; padding: 0px; margin: 4px 0px 0px 0px; float: left; background-image: none; color: #F39221; line-height: normal">
												<span style="color: #5a3e2e">筛选条件：</span> <logic:present
													name="text">
													<logic:notEmpty name="text">
														<span id="catalogNameButton">分类：${text} <img
																onClick="filterCatalog();" style="cursor: hand;"
																src="${ctx}/images/filter_cancel.jpg" /border="0">
														</span>
													</logic:notEmpty>
												</logic:present> <span id="plus" style="display: none">+</span> <logic:present
													name="textBrand">
													<logic:notEmpty name="textBrand">
														<span id="brandNameButton"> 品牌：${textBrand}<img
																onClick="filterBrand();" style="cursor: hand;"
																src="${ctx}/images/filter_cancel.jpg" /border="0">
														</span>
													</logic:notEmpty>
												</logic:present> </span>
										</li>
									</ul>
								</div>
								<div class="products_compare">
									<ul>
										<span style="float: left; padding: 5px 5px 0px 5px;">商品对比
											>></span>
										<li style="border: 0px; text-align: center; padding: 0px">
											<label>
												<input type="button" name="compareButton" value="对比所选商品"
													class="products_compare_menu">
											</label>
										</li>
									</ul>
								</div>
								<div class="products_status">
									<%@ include file="/pages/safeai/jsp/common/shopPage.jsp"%>
								</div>
								<div class="products_grid">
									<ul>
										<logic:iterate id="product" name="viesRange"
											property="records">
											<li>
												<ul>
													<span class="brand_logo"
														style="width: 50px; height: 15px; display: block;"><img
															style="width: 50px; height: 15px; font-size: 0;"
															src="${ctx}/Brand_image/${product.brandId}.jpg"
															border="0" /> </span>
													<li style="text-align: center">
														<a style="width: 130px; height: 130px; display: block;"
															href="${ctx}/product/productMessage.do?method=shopDeatails&id=${product.id}"
															target="_blank"><img
																style="width: 130px; height: 130px;"
																src="${ctx}/product_image/${product.id}_1_130X130.jpg"
																/ border="0"> </a>
													</li>
													<li class="index_products_name">
														<a
															href="${ctx}/product/productMessage.do?method=shopDeatails&id=${product.id}"
															target="_blank" class="pname"> ${product.name} <logic:present
																name="product" property="frees">
																<logic:notEmpty name="product" property="frees">&nbsp;送
	    															<logic:iterate id="free" name="product" property="frees" indexId="index">
																		<c:if test="${index==0}"> ${free.name}</c:if>
																		<c:if test="${index>0}">${free.name}</c:if>
																	</logic:iterate>
																</logic:notEmpty>
															</logic:present> </a>
													</li>
                                                     <li style="padding:8px 0px 0px  0px;height:20px">
                                                     <font class="stock">
                                           				<c:if test="${product.status==1}">
															库存状态：现货
														</c:if>
														<c:if test="${product.status==2}">
															库存状态：需订货
														</c:if>
														<c:if test="${product.status==3}">
															库存状态：暂时缺货
														</c:if>
                                                     </font>
                                                     </li>
													<li style="padding: 5px 0px 0px 0px; height: 20px">
                                                    
														<logic:notEmpty name="product" property="free">
															<img src="${ctx}/images/zp.jpg" /border="0">
															<span class="zp">有赠品</span>
														</logic:notEmpty>
														<logic:equal value="1" name="product"
															property="freeDeliver">
															<img src="${ctx}/images/freeshipping.jpg" /border="0">
															<span class="freeshipping">免运费</span>
														</logic:equal>
													</li>
													<li>
														锐意价:
														<bean:define id="isShowPrice" value='ShowPrice'></bean:define>
														<logic:present name="product" property="specialPrice">
															<logic:notEmpty name="product" property="specialPrice">
																<logic:notEqual value="0" name="product"
																	property="specialPrice">
																	<bean:define id="isShowPrice" value='notShowPrice'></bean:define>
																	<span class="index_price">${product.specialPrice}</span>
																</logic:notEqual>
															</logic:notEmpty>
														</logic:present>
														<logic:notEqual value="notShowPrice" name="isShowPrice">
															<span class="index_price">${product.price}</span>
															<bean:define id="isShowPrice" value='ShowPrice'></bean:define>
														</logic:notEqual>
														元
													</li>
													<li>
														<div class="product_compare">
															<label>
																<input type="checkbox" id="chkSel" name="chkSel"
																	value="${product.id}" label="${product.name}" />
															</label>
															<span style="color:#888888">商品对比</span>
														</div>
														<div class="product_addcart">
															<logic:equal value="1" name="product" property="status">
																<a
																	href="${ctx}/shopping/viewShoppingCart.do?m=addProductForward&id=${product.id}&number=1"
																	target="shoppingCart"> <img
																		src="${ctx}/images/products_addcart.jpg" /border="0" />
																</a>
															</logic:equal>
															<logic:notEqual value="1" name="product"
																property="status">
																<a href="javaScript:void(0)"
																	onClick="toProductnotify(${product.id},'${product.name}','${USERINFOFRONT.uid}');"><img
																		src="${ctx}/images/products_tongzhi.jpg" /border="0" />
																</a>
															</logic:notEqual>
														</div>
													</li>
												</ul>
											</li>
										</logic:iterate>
									</ul>
								</div>
								<div class="products_status">
									<%@ include file="/pages/safeai/jsp/common/shopPage.jsp"%>
								</div>
								<div class="products_compare">
									<ul>
										<span style="float: left; padding: 5px 5px 0px 5px;">商品对比
											>></span>
										<li style="border: 0px; text-align: center; padding: 0px">
											<label>
												<input type="button" name="compareButton" value="对比所选商品"
													class="products_compare_menu">
											</label>
										</li>
									</ul>
								</div>
							</logic:notEmpty>
						</div>
					</div>
				</form>
				<div class="bottom">
					<%@ include file="/pages/safeai/jsp/shop/bottom.jsp"%>
				</div>


			</div>
		</div>

	</body>
</html>
